<link href="../addons/jy_area_agent/resource/css/style.css" rel="stylesheet">
<div class="fui-page fui-page-current page-commission-down">
    <div class="fui-header">
        <div class="fui-header-left">
            <a class="back" ng-click='goback()'></a>
        </div>
        <div class="title">区域订单({{pagedata.commission_total}}个)</div>
    </div>
    <div class="fui-content">
        <div class='fui-cell-group' style='margin-top:0px;background: #fea23d;color: #fff;'>
            <div class='fui-cell'>
                <div ng-if="pagedata.params.isxuni!=1" class='fui-cell-info' style='width:auto;color: #fff;'>累计分红：+{{pagedata.commission_money}}元</div>
				<div ng-if="pagedata.params.isxuni==1" class='fui-cell-info' style='width:auto;color: #fff;'>累计{{pagedata.xuniname}}：+{{pagedata.commission_money}}个</div>
            </div>
        </div>
        <div ng-if="pagedata.params.isarea!=1 && pagedata.params.isxuni!=1" class="fui-tab fui-tab-warning" id="tab">
            <a ng-repeat="(level,num) in pagedata.levels" ng-click="pagedata.params.level=level;tool.get_list('/order/list/',true)" ng-class="{'active':pagedata.params.level==level}" href="javascript:;">{{pagedata.area_types[level]}}({{num}})</a>
        </div>
		<div class="jy-content">
        <div  class="fui-list-group" id="container">
		<div ng-repeat="item in pagedata.list track by item.id" class="fui-list" style="height: auto">
			<div class="fui-list-media">
				<img ng-if="item.member.avatar" ng-src="{{tomedia(item.member.avatar)}}" class="round" style="width:2rem;height:2rem">
				<i ng-if="!item.member.avatar" class="icon icon-my2"></i>
			</div>
			<div class="fui-list-inner">
				<div class="row">
				      <div class="row-text" >
					 {{item.member.nickname}}
				      </div>
				</div>
				<div class="subtitle">
				    {{item.ordersn}}
				</div>
				<div class="subtitle">
				    {{item.createtime}}
				</div>
				<div class="subtitle" ng-if="item.send_status==14">
					<span class="btn btn-sm btn-success" ng-click="pagedata.showorder=true;pagedata.getorder(item.ordersn);">审核订单</span>
				</div>
			</div>
			<div  class="row-remark">
				<p>预计佣金:{{item.money}}元</p>
				<p>预计{{pagedata.xuniname}}:{{item.xuni_money}}个</p>
			</div>
		</div>
		</div>
		<div class='infinite-loading' style="display:none" id="loading_show"><span class='fui-preloader'></span><span class='text'> 正在加载...</span></div>
		<div ng-if="pagedata.list.length==0" class='content-empty' >
			<img src="../core/resource/images/nomeb.png" style="width: 6rem;margin-bottom: .5rem;"><br/><p style="color: #999;font-size: .75rem">暂时没有任何数据</p>
		</div>
	</div>
    </div>
</div>
<div ng-include="sys_html('_footer')"></div>
<div ng-if="pagedata.showorder" class="popup">
	<div class="popup-body">
		<div class="popup-bottom" style="padding-top:1rem;padding-bottom:2rem">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showorder=false"></i>
				<div ng-repeat="m in pagedata.orderitem.merchs" style="background:none">
						<div class="fui-list external" style="padding: 0 0.5rem">
							<div class="fui-list-inner">
								<div class="subtitle" ng-if="m.id"><i class="icon jinyunicon icon-dianpu"></i>  {{m.merchname || '多商户'}}</div>
								<div class="subtitle" ng-if="!m.id"><i class="icon jinyunicon icon-dianpu"></i>  {{pagedata.shopset.store_title || '平台自营'}}</div>
							</div>
						</div> 
						<div href="javascript:;" ng-repeat="g in m.goods" class="external">
							<div class="fui-list">
								<div class="fui-list-media" style="">
									<img class="" ng-src="{{tomedia(g.image) || '../core/resource/images/nopic.jpg'}}">
								</div>
								<div class="fui-list-inner">
									<div class="text goodstitle towline">{{g.title}}</div>
									<div class="text" style="color:#f60;font-size:0.60rem">{{g.selespename || '无规格'}} x {{g.total || 1}} /{{g.unit ||'件'}}<span ng-if="g.weight!='0.00'"> ({{g.weight}}kg)</span></div>
					
								</div>
								<div class="fui-list-angle" style="width:auto">
									<div>￥<span class="marketprice syscolorred">{{g.price}}</span></div>
								</div>
							</div>
						</div>
				</div>
				<div class="fui-navbar">
					<a href="javascript:;" ng-click="post({},'/order/ordersh/ordersn='+pagedata.orderitem.ordersn);" class="nav-item btn btn-danger confirmbtn">审核通过</a>
				</div>
		</div>
	</div>
</div>
<script>
scope.tool.get_list('/order/list/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('/order/list/');
}
scope.pagedata.getorder=function(ordersn){
	scope.get('//getorder/ordersn='+ordersn,function(res){
		scope.pagedata.orderitem=res;
		scope.$evalAsync();
	});
}
</script>

